﻿/**
<code>
  <author name="Zealic" email="zealic(at)gmail.com" type="Creator"/>
</code>
**/
using System;
using System.Collections;
using System.Collections.Generic;

using Zealib.Template;


namespace Zealib.Extensions
{
    /// <summary>
    /// Extensions for <seealso cref="System.String"/> class.
    /// </summary>
    public static class StringExtensions
    {
        //TODO: Implement this class.


        public static string NamedFormat(this string self, object source)
        {
            if (self == null) throw new ArgumentNullException("self");
            if (source == null) throw new ArgumentNullException("source");
            if (!source.GetType().IsAnonymous())
                throw new ArgumentException("Must be anonymous type.", "source");
            throw new NotImplementedException();
        }

        public static string NamedFormat(this string self, Func<string, string> resolver)
        {
            var source = new DelegateVariableSource(resolver);
            return NamedFormat(self, source);
        }

        public static string NamedFormat(this string self, IVariableSource source)
        {
            throw new NotImplementedException();
        }

        public static string NamedFormat(this string self, IDictionary<string, string> source)
        {
            throw new NotImplementedException();
        }

        public static string NamedFormat(this string self, Hashtable source)
        {
            throw new NotImplementedException();
        }

    }
}
